package com.cao.project.domain;

import java.io.Serializable;
import java.util.Date;

import com.cao.common.core.domain.BaseEntity;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import com.cao.common.annotation.Excel;

/**
 * 任务：存储项目下的任务信息对象 pro_task
 *
 * @author cao
 * @date 2025-03-03
 */
@Data
@TableName(value = "pro_task")
public class Task extends BaseEntity implements Serializable {
    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    /**
     * 任务ID
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 所属项目ID
     */
    @Excel(name = "所属项目ID")
    @TableField(value = "project_id")
    private Long projectId;

    /**
     * 项目名称
     */
    @Excel(name = "项目名称")
    @TableField(value = "project_name")
    private String projectName;

    /**
     * 任务负责人ID
     */
    @Excel(name = "任务负责人ID")
    @TableField(value = "assigned_to")
    private Long assignedTo;

    /**
     * 负责人名称
     */
    @Excel(name = "负责人名称")
    @TableField(value = "assigned_to_name")
    private String assignedToName;

    /**
     * 类型
     */
    @Excel(name = "类型")
    @TableField(value = "type")
    private String type;

    /**
     * 任务标题
     */
    @Excel(name = "任务标题")
    @TableField(value = "title")
    private String title;

    /**
     * 任务描述
     */
    @Excel(name = "任务描述")
    @TableField(value = "description")
    private String description;

    /**
     * 任务优先级
     */
    @Excel(name = "任务优先级")
    @TableField(value = "priority")
    private String priority;

    /**
     * 任务状态
     */
    @Excel(name = "任务状态")
    @TableField(value = "status")
    private String status;

    /**
     * 任务开始日期
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "任务开始日期", width = 30, dateFormat = "yyyy-MM-dd")
    @TableField(value = "start_date")
    private Date startDate;

    /**
     * 任务截止日期
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "任务截止日期", width = 30, dateFormat = "yyyy-MM-dd")
    @TableField(value = "due_date")
    private Date dueDate;

    /**
     * 任务完成时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "任务完成时间", width = 30, dateFormat = "yyyy-MM-dd")
    @TableField(value = "completed_at")
    private Date completedAt;

    /**
     * 创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
    @TableField(value = "created_at")
    private Date createdAt;

    /**
     * 修改时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "修改时间", width = 30, dateFormat = "yyyy-MM-dd")
    @TableField(value = "modified_at")
    private Date modifiedAt;


}
